'''
Created on 13.11.2012

@author: felix_000
'''
from game.player.PlayerInterface import PlayerInterface
import random
from game import GameLogic

class RandomPlayer(PlayerInterface):
    '''
    classdocs
    '''


    def requestAction(self, field, color, switchAllowed, ply):
        actions = GameLogic.getAllowedFields(field, color)
        index = random.randint(0, len(actions)-1)
        return actions[index]
    
    def stopable(self):
        return False
    
    def isHumanPlayer(self):
        return False